﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
using Pyramid.Models;

namespace Pyramid.Dal
{
	public class PyramidDatabaseInitializer : DropCreateDatabaseAlways<PyramidDbContext>
	{
		protected override void Seed(PyramidDbContext context)
		{
			context.Accounts.Add(new Account
				{
					Id = 1,
					UserId = "admin",
					Password = "202CB962AC5975B964B7152D234B70", //密码：123
					Email = "aaa@163.com",
					FullName = "admin",
					Mobile = "137123456789",
					UserType = (int) UserTypes.Developer
				});

			var webObjects = new List<WebObject>
				{
					new WebObject {Id = "pcm", Name = "个人中心", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 1},
					new WebObject {Id = "pcm_changepwd", Name = "修改密码", ParentId = "pcm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Home/ChangePassword", Target = "navTab", OrderWeight = 1},

					new WebObject {Id = "acm", Name = "管理中心", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 2},
					new WebObject {Id = "acm_archive", Name = "管理中心档案", ParentId = "acm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/AdminCenter/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "acm_acaccount", Name = "管理中心账户", ParentId = "acm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/AdminCenter/AccountList", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "acm_payment", Name = "收款申请", ParentId = "acm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/AdminCenter/PaymentList", Target = "navTab", OrderWeight = 3},

					new WebObject {Id = "mcm", Name = "会员中心", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 3},
					new WebObject {Id = "mcm_archive", Name = "会员中心档案", ParentId = "mcm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/MemberCenter/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "mcm_mcaccount", Name = "会员中心账号", ParentId = "mcm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/MemberCenter/AccountList", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "mcm_payment", Name = "收款申请", ParentId = "mcm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/MemberCenter/PaymentList", Target = "navTab", OrderWeight = 3},

					new WebObject {Id = "ccm", Name = "顾客中心", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 4},
					new WebObject {Id = "ccm_archive", Name = "顾客基本资料", ParentId = "ccm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Customer/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "ccm_health", Name = "顾客健康档案", ParentId = "ccm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/CustomerHealth/List", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "ccm_ccaccount", Name = "顾客系统账号", ParentId = "ccm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Customer/AccountList", Target = "navTab", OrderWeight = 3},
					new WebObject {Id = "ccm_payment", Name = "收款申请", ParentId = "ccm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Customer/PaymentList", Target = "navTab", OrderWeight = 4},
					new WebObject {Id = "ccm_consumeitem", Name = "消费项目管理", ParentId = "ccm", WebObjectType = (int) WebObjectTypes.Menu, Href = "/ConsumeItem/List", Target = "navTab", OrderWeight = 5},

					new WebObject {Id = "sal", Name = "薪资管理", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 5},
					new WebObject {Id = "sal_salarypart", Name = "薪资项目设置", ParentId = "sal", WebObjectType = (int) WebObjectTypes.Menu, Href = "/SalaryPart/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "sal_salaryset", Name = "员工薪资设置", ParentId = "sal", WebObjectType = (int) WebObjectTypes.Menu, Href = "/StaffSalarySet/List", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "sal_attendance", Name = "员工考勤统计", ParentId = "sal", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Attendance/Manage", Target = "navTab", OrderWeight = 3},
					new WebObject {Id = "sal_performance", Name = "员工绩效统计", ParentId = "sal", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Performance/Manage", Target = "navTab", OrderWeight = 4},
					new WebObject {Id = "sal_achievement", Name = "员工业绩统计", ParentId = "sal", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Achievement/List", Target = "navTab", OrderWeight = 5},
					new WebObject {Id = "sal_salarycalc", Name = "每月薪资计算", ParentId = "sal", WebObjectType = (int) WebObjectTypes.Menu, Href = "/StaffSalary/CalcPage", Target = "navTab", OrderWeight = 5},

					new WebObject {Id = "fin", Name = "财务管理", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 6},
					new WebObject {Id = "fin_project", Name = "收款项目管理", ParentId = "fin", WebObjectType = (int) WebObjectTypes.Menu, Href = "/FinanceProject/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "fin_financeaccount", Name = "收款账号管理", ParentId = "fin", WebObjectType = (int) WebObjectTypes.Menu, Href = "/FinanceAccount/List", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "fin_payverify", Name = "收款审核确认", ParentId = "fin", WebObjectType = (int) WebObjectTypes.Menu, Href = "/PayVerify/List", Target = "navTab", OrderWeight = 3},

					new WebObject {Id = "bsi", Name = "基础数据", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 7},
					new WebObject {Id = "bsi_department", Name = "部门管理", ParentId = "bsi", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Department/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "bsi_staffposition", Name = "职位管理", ParentId = "bsi", WebObjectType = (int) WebObjectTypes.Menu, Href = "/StaffPosition/List", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "bsi_marketzone", Name = "市场区域划分", ParentId = "bsi", WebObjectType = (int) WebObjectTypes.Menu, Href = "/MarketZone/List", Target = "navTab", OrderWeight = 3},
					new WebObject {Id = "bsi_staff", Name = "员工档案", ParentId = "bsi", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Staff/List", Target = "navTab", OrderWeight = 4},
					new WebObject {Id = "bsi_staffaccount", Name = "员工账号", ParentId = "bsi", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Staff/AccountList", Target = "navTab", OrderWeight = 5},

					new WebObject {Id = "cms", Name = "网站管理", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 8},
					new WebObject {Id = "cms_channel", Name = "网站栏目", ParentId = "cms", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Channel/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "cms_article", Name = "内容管理", ParentId = "cms", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Article/List", Target = "navTab", OrderWeight = 2},

					new WebObject {Id = "sys", Name = "系统管理", ParentId = "", WebObjectType = (int) WebObjectTypes.Module, OrderWeight = 9},
					new WebObject {Id = "sys_user", Name = "用户管理", ParentId = "sys", WebObjectType = (int) WebObjectTypes.Menu, Href = "/User/List", Target = "navTab", OrderWeight = 1},
					new WebObject {Id = "sys_role", Name = "角色管理", ParentId = "sys", WebObjectType = (int) WebObjectTypes.Menu, Href = "/Role/List", Target = "navTab", OrderWeight = 2},
					new WebObject {Id = "sys_webobject", Name = "系统功能", ParentId = "sys", WebObjectType = (int) WebObjectTypes.Menu, Href = "/WebObject/List", Target = "navTab", OrderWeight = 3},
				};
			foreach (var m in webObjects)
			{
				context.WebObjects.Add(m);
			}

			var staffPositions = new List<StaffPosition>
				{
					new StaffPosition {Id = 1, Name = "检测专家"},
					new StaffPosition {Id = 2, Name = "营养专家"},
					new StaffPosition {Id = 3, Name = "抗衰专家"},
					new StaffPosition {Id = 4, Name = "医学助理"},
					new StaffPosition {Id = 5, Name = "医学顾问"}
				};
			foreach (var sp in staffPositions)
			{
				context.StaffPositions.Add(sp);
			}
			var departments = new List<Department>
				{
					new Department {Id = 1, Name = "行政人事部", Description = ""},
					new Department {Id = 2, Name = "技术总部", Description = ""},
					new Department {Id = 3, Name = "财务总部", Description = ""},
					new Department {Id = 4, Name = "法务部", Description = ""},
					new Department {Id = 5, Name = "营销总部", Description = ""},
					new Department {Id = 6, Name = "国内事业部", Description = ""},
					new Department {Id = 6, Name = "海外事业部", Description = ""},
				};
			foreach (var dep in departments)
			{
				context.Departments.Add(dep);
			}

			var markets = new List<MarketZone>
				{
					new MarketZone {ZoneId = 1, ZoneName = "华东地区"},
					new MarketZone {ZoneId = 2, ZoneName = "华南地区"},
					new MarketZone {ZoneId = 3, ZoneName = "华中地区"},
					new MarketZone {ZoneId = 4, ZoneName = "海外市场"},
				};
			foreach (var market in markets)
			{
				context.MarketZones.Add(market);
			}

			var salaryParts = new List<SalaryPart>
				{
					new SalaryPart {Id = 1, Name = "基本工资",Code = "sp_base",SalaryPartType = (int) SalaryPartTypes.System, VariableName = "基本工资", Remark = "固定工资", CalculateType = (int)CalculateTypes.Add, DisplayFormat = "C"},
					new SalaryPart {Id = 2, Name = "全勤奖励",Code = "sp_full", SalaryPartType = (int) SalaryPartTypes.System, VariableName = "全勤奖", Remark = "出勤天数等于本月应出勤天数时，全额发放", CalculateType = (int)CalculateTypes.Add,DisplayFormat = "C"},
					new SalaryPart {Id = 3, Name = "绩效工资",Code = "sp_perf", SalaryPartType = (int) SalaryPartTypes.System, VariableName = "绩效工资基数", Remark = "绩效工资 ＝ 绩效工资基数 × 绩效得分", CalculateType = (int)CalculateTypes.Add,DisplayFormat = "C"},
					new SalaryPart {Id = 4, Name = "业绩提成",Code = "sp_achi", SalaryPartType = (int) SalaryPartTypes.System, VariableName = "业绩提成比例", Remark = "业绩工资 ＝ 业绩 × 业绩提成比例", CalculateType = (int)CalculateTypes.Add,DisplayFormat = "P"},
				};
			foreach (var sp in salaryParts)
			{
				context.SalaryParts.Add(sp);
			}

			var fps = new List<FinanceProject>
				{
					new FinanceProject {Name = "管理中心加盟费", PayerType = (int) PayerTypes.AdminCenter,ProjectType = (int)FinanceProjectTypes.System,Remark = ""},
					new FinanceProject {Name = "会员中心加盟费", PayerType = (int) PayerTypes.MemberCenter,ProjectType = (int)FinanceProjectTypes.System, Remark = ""},
					new FinanceProject {Name = "顾客充值", PayerType = (int) PayerTypes.Customer,ProjectType = (int)FinanceProjectTypes.System, Remark = ""},
				};
			foreach (var fp in fps)
			{
				context.FinanceProjects.Add(fp);
			}

			#region 顾客健康管理基础数据

			var humanBodySystems = new List<HumanBodySystem>
				{
					new HumanBodySystem
						{
							Id = 1, Name = "神经系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "失眠多梦"},
									new HealthCondition {Name = "偏头痛"},
									new HealthCondition {Name = "记忆力减退"},
									new HealthCondition {Name = "反应迟钝"},
									new HealthCondition {Name = "突然觉得心慌心跳"},
									new HealthCondition {Name = "时有胸闷背痛"},
									new HealthCondition {Name = "盗汗"},
									new HealthCondition {Name = "头晕"},
									new HealthCondition {Name = "情绪多变"},
								}
						},
					new HumanBodySystem
						{
							Id = 2, Name = "循环系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "冠心病"},
									new HealthCondition {Name = "高血压"},
									new HealthCondition {Name = "高血脂"},
									new HealthCondition {Name = "高血糖"},
									new HealthCondition {Name = "糖尿病"},
									new HealthCondition {Name = "心肌萎缩"},
									new HealthCondition {Name = "动脉硬化"},
									new HealthCondition {Name = "病理性肥胖"},
								}
						},
					new HumanBodySystem
						{
							Id = 3, Name = "代谢系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "腰腹部赘肉"},
									new HealthCondition {Name = "口苦"},
									new HealthCondition {Name = "口臭"},
									new HealthCondition {Name = "营养吸收差"},
								}
						},
					new HumanBodySystem
						{
							Id = 4, Name = "免疫系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "平时容易感冒"},
									new HealthCondition {Name = "哮喘"},
									new HealthCondition {Name = "经常吸烟"},
									new HealthCondition {Name = "喝酒习惯"},
									new HealthCondition {Name = "不健康饮食不运动"},
									new HealthCondition {Name = "情绪压抑"},
									new HealthCondition {Name = "舌口溃疡"},
									new HealthCondition {Name = "经常咳嗽"},
									new HealthCondition {Name = "咽痛"},
									new HealthCondition {Name = "各种肿瘤"},
								}
						},
					new HumanBodySystem
						{
							Id = 5, Name = "运动系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "周身无力"},
									new HealthCondition {Name = "易疲劳"},
									new HealthCondition {Name = "体力下降"},
									new HealthCondition {Name = "关节退化"},
									new HealthCondition {Name = "骨质增生"},
									new HealthCondition {Name = "肩周劳损"},
									new HealthCondition {Name = "腰酸背疼"},
									new HealthCondition {Name = "腿抽筋"},
								}
						},
					new HumanBodySystem
						{
							Id = 6, Name = "内分泌系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "月经失调"},
									new HealthCondition {Name = "更年期提前"},
									new HealthCondition {Name = "性功能减退"},
									new HealthCondition {Name = "性冷淡"},
									new HealthCondition {Name = "腰部酸痛"},
									new HealthCondition {Name = "不孕"},
									new HealthCondition {Name = "头发干枯无光泽"},
									new HealthCondition {Name = "脱发"},
									new HealthCondition {Name = "有过流产史"},
									new HealthCondition {Name = "听力下降"},
									new HealthCondition {Name = "耳鸣"},
									new HealthCondition {Name = "月经量少经期短"},
									new HealthCondition {Name = "颜色暗"},
									new HealthCondition {Name = "更年期潮热"},
									new HealthCondition {Name = "腿脚膝盖无力"},
									new HealthCondition {Name = "时常感到头晕眼花"},
									new HealthCondition {Name = "牙龈经常肿胀"},
									new HealthCondition {Name = "牙齿松动"},
									new HealthCondition {Name = "头发多油腻脱发"},
									new HealthCondition {Name = "白带过多"},
									new HealthCondition {Name = "乳腺增生"},
									new HealthCondition {Name = "子宫肌瘤"},
									new HealthCondition {Name = "月经不调"},
									new HealthCondition {Name = "痛经"},
								}
						},
					new HumanBodySystem
						{
							Id = 7, Name = "消化系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "胃酸分泌失衡"},
									new HealthCondition {Name = "胃肠道蠕动慢"},
									new HealthCondition {Name = "胃部胀痛不适"},
									new HealthCondition {Name = "便秘"},
									new HealthCondition {Name = "食量多"},
									new HealthCondition {Name = "肥胖"},
									new HealthCondition {Name = "宴请聚餐次数多"},
									new HealthCondition {Name = "胃胀"},
									new HealthCondition {Name = "消化不良"},
									new HealthCondition {Name = "反胃"},
									new HealthCondition {Name = "唇干裂口干"},
									new HealthCondition {Name = "无光泽唇周长痘溃疡"},
									new HealthCondition {Name = "流涎"},
									new HealthCondition {Name = "生活不规律不吃早餐"},
									new HealthCondition {Name = "长斑长痘"},
									new HealthCondition {Name = "大便干结"},
								}
						},
					new HumanBodySystem
						{
							Id = 8, Name = "皮肤系统", HealthConditions = new Collection<HealthCondition>
								{
									new HealthCondition {Name = "皮肤松弛下垂"},
									new HealthCondition {Name = "皱纹变深"},
									new HealthCondition {Name = "过敏性皮肤"},
									new HealthCondition {Name = "面色发暗青灰"},
									new HealthCondition {Name = "皮肤干燥无光泽"},
									new HealthCondition {Name = "色斑"},
									new HealthCondition {Name = "色素沉着"},
									new HealthCondition {Name = "黄褐斑"},
									new HealthCondition {Name = "眼袋"},
									new HealthCondition {Name = "黑眼圈"},
								}
						},
				};
			foreach (var hbs in humanBodySystems)
			{
				context.HumanBodySystems.Add(hbs);
			}

			var consumeItems = new List<ConsumeItem>
			                   {
								   new ConsumeItem{Id=1, Domain = "八大系统" , Group = "心血管系统", ItemName = "全套心血管系统评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=2, Domain = "八大系统" , Group = "心血管系统", ItemName = "血管壁张力检测评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=3, Domain = "八大系统" , Group = "心血管系统", ItemName = "生物电离子分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=4, Domain = "八大系统" , Group = "心血管系统", ItemName = "心脏功能评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=5, Domain = "八大系统" , Group = "心血管系统", ItemName = "动脉硬化和动脉阻塞程度分析", MarketPrice = 0, VipPrice = 0},

								   new ConsumeItem{Id=6, Domain = "八大系统" , Group = "免疫系统", ItemName = "全套免疫功能评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=7, Domain = "八大系统" , Group = "免疫系统", ItemName = "自然杀手细胞功能评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=8, Domain = "八大系统" , Group = "免疫系统", ItemName = "慢性食物过敏原分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=9, Domain = "八大系统" , Group = "免疫系统", ItemName = "食品添加物过敏原分析", MarketPrice = 0, VipPrice = 0},

								   new ConsumeItem{Id=10, Domain = "八大系统" , Group = "肠胃道系统", ItemName = "肠道免疫功能分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=11, Domain = "八大系统" , Group = "肠胃道系统", ItemName = "肠道微生物菌群分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=12, Domain = "八大系统" , Group = "肠胃道系统", ItemName = "全套肠胃道系统综合分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=13, Domain = "八大系统" , Group = "肠胃道系统", ItemName = "肠漏症/小肠渗透力分析", MarketPrice = 0, VipPrice = 0},

								   new ConsumeItem{Id=14, Domain = "八大系统" , Group = "代谢系统", ItemName = "全套代谢功能分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=15, Domain = "八大系统" , Group = "代谢系统", ItemName = "肝脏解毒功能分析", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=16, Domain = "八大系统" , Group = "代谢系统", ItemName = "心血管代谢症候群健康评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=17, Domain = "八大系统" , Group = "代谢系统", ItemName = "骨质代谢健康评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=18, Domain = "八大系统" , Group = "代谢系统", ItemName = "泛自闭症障碍综合评估", MarketPrice = 0, VipPrice = 0},
								   new ConsumeItem{Id=19, Domain = "八大系统" , Group = "代谢系统", ItemName = "肾脏代谢功能分析", MarketPrice = 0, VipPrice = 0},

								    new ConsumeItem{Id=20, Domain = "八大系统" , Group = "生殖系统", ItemName = "酸碱度分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=21, Domain = "八大系统" , Group = "生殖系统", ItemName = "阴道菌群分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=22, Domain = "八大系统" , Group = "生殖系统", ItemName = "性腺荷尔蒙分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=23, Domain = "八大系统" , Group = "生殖系统", ItemName = "女性卵巢功能分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=24, Domain = "八大系统" , Group = "生殖系统", ItemName = "男性前列腺分析", MarketPrice = 0, VipPrice = 0},

									new ConsumeItem{Id=25, Domain = "八大系统" , Group = "内分泌系统", ItemName = "全套男性荷尔蒙健康评估", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=26, Domain = "八大系统" , Group = "内分泌系统", ItemName = "全套女性荷尔蒙健康评估", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=27, Domain = "八大系统" , Group = "内分泌系统", ItemName = "全套雌性激素代谢分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=28, Domain = "八大系统" , Group = "内分泌系统", ItemName = "雌激素代谢分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=29, Domain = "八大系统" , Group = "内分泌系统", ItemName = "全套肾上腺皮质压力分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=30, Domain = "八大系统" , Group = "内分泌系统", ItemName = "精神荷尔蒙健康评估", MarketPrice = 0, VipPrice = 0},

									new ConsumeItem{Id=31, Domain = "八大系统" , Group = "环境系统", ItemName = "环境荷尔蒙系列：增塑剂/防腐剂", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=32, Domain = "八大系统" , Group = "环境系统", ItemName = "营养与毒性元素分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=33, Domain = "八大系统" , Group = "环境系统", ItemName = "毒性元素螯合分析", MarketPrice = 0, VipPrice = 0},

									new ConsumeItem{Id=34, Domain = "八大系统" , Group = "营养系统", ItemName = "全套个性化营养评估", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=35, Domain = "八大系统" , Group = "营养系统", ItemName = "氧化压力分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=36, Domain = "八大系统" , Group = "营养系统", ItemName = "抗氧化维生素分析", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=37, Domain = "八大系统" , Group = "营养系统", ItemName = "氨基酸平衡性分析", MarketPrice = 0, VipPrice = 0},

									new ConsumeItem{Id=38, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "优孕优生营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=39, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "儿童智力发展营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=40, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "男女性荷尔蒙营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=41, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "女性健康防癌营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=42, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "男性健康防癌营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=43, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "男女性抗衰老加强营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=44, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "男女性抗衰老基础营养套组", MarketPrice = 0, VipPrice = 0},
									new ConsumeItem{Id=45, Domain = "营养调理" , Group = "定制功能医学营养套组", ItemName = "男女八大系统脏器功能储备营养套组", MarketPrice = 0, VipPrice = 0},

									new ConsumeItem{Id=46, Domain = "个性化细胞抗衰" , Group = "功能医学个性化细胞抗衰", ItemName = "定制功能医学个性化细胞抗衰", MarketPrice = 0, VipPrice = 0},
			                   };
			foreach (var ci in consumeItems)
			{
				context.ConsumeItems.Add(ci);
			}

			#endregion

			#region test data

			var staves = new List<Staff>
				{
					new Staff {DepartmentId = 1, Gender = (int) Genders.Male, Birthday = DateTime.Parse("1982-01-01"), BriefIntro = "", Code = "ST0001", FullName = "唐某某", IdCard = "430123123112311231", EntryDate = DateTime.Parse("2012-05-01"), CreateTime = DateTime.Now, CreateUserId = "admin", EditTime = DateTime.Now, EditUserId = "admin", HomeAddress = "", Mobile = "13812345678", PositionId = 1, Status = (int) StaffStatus.InService},
					new Staff {DepartmentId = 1, Gender = (int) Genders.Female, Birthday = DateTime.Parse("1982-01-01"), BriefIntro = "", Code = "ST0002", FullName = "王某某", IdCard = "430123123112311232", EntryDate = DateTime.Parse("2012-05-01"), CreateTime = DateTime.Now, CreateUserId = "admin", EditTime = DateTime.Now, EditUserId = "admin", HomeAddress = "", Mobile = "13812345679", PositionId = 1, Status = (int) StaffStatus.InService},
				};
			foreach (var staff in staves)
			{
				staff.StaffSalarySetMasters = new Collection<StaffSalarySetMaster>
					{
						new StaffSalarySetMaster
							{
								CreateTime = DateTime.Now,
								CreateUserId = "admin",
								EditTime = DateTime.Now,
								EditUserId = "admin",
								EffectiveDate = DateTime.Parse("2012-05-01"),
								Remark = "测试数据",
								StaffSalarySetDetails = new Collection<StaffSalarySetDetail>
									{
										new StaffSalarySetDetail {PartId = 1, Value = 5000},
										new StaffSalarySetDetail {PartId = 2, Value = 500},
										new StaffSalarySetDetail {PartId = 3, Value = 100},
										new StaffSalarySetDetail {PartId = 4, Value = 0.1M},
									}
							}
					};
				context.Staves.Add(staff);
			}

			var customers = new List<Customer>
				{
					new Customer {Address = "火星", IdCard = "43012345678912345", Interest = "篮球", IsVip = true, EditTime = DateTime.Now, MaritalStatus = (int) MaritalStatus.Married, Mobile = "137123456789", EditUserId = "admin", Profession = "CEO", Education = "小学", Email = "ssss@163.com", PostalCode = "400000", CreateTime = DateTime.Now, CreateUserId = "admin", CardType = (int) CardTypes.IdCard, Birthday = DateTime.Parse("1982-01-01"), Code = "VIP2013050001", EnglishName = "Tom", FullName = "李刚", Fax = "020-12345678", Gender = (int) Genders.Male, Remark = "测试数据", RevenueLevel = (int) RevenueLevels.Level500, ReceiveNews = true, Tel = "110"},
					new Customer {Address = "月球", IdCard = "43012345678912345", Interest = "看电影", IsVip = true, EditTime = DateTime.Now, MaritalStatus = (int) MaritalStatus.Single, Mobile = "137123456789", EditUserId = "admin", Profession = "CEO", Education = "本科", Email = "bbbb@163.com", PostalCode = "400000", CreateTime = DateTime.Now, CreateUserId = "admin", CardType = (int) CardTypes.IdCard, Birthday = DateTime.Parse("1982-01-01"), Code = "VIP2013050002", EnglishName = "Tom", FullName = "李刚儿子", Fax = "020-12345678", Gender = (int) Genders.Male, Remark = "测试数据", RevenueLevel = (int) RevenueLevels.Level500, ReceiveNews = true, Tel = "120"},
				};
			foreach (var c in customers)
			{
				context.Customers.Add(c);
			}

			var channels = new List<Channel>
				{
					new Channel {Name = "金字塔集团管控平台", Remark = "测试数据"},
					new Channel {Name = "金字塔管理中心", Remark = "测试数据"},
					new Channel {Name = "金字塔会员服务中心", Remark = "测试数据"},
					new Channel {Name = "金字塔VIP顾客健康管理", Remark = "测试数据"},
				};
			foreach (var c in channels)
			{
				context.Channels.Add(c);
			}

			#endregion
		}
	}
}